// 用户相关类型定义
export interface User {
  id: number;
  username: string;
  nickname: string;
  email: string;
  phone: string | number;
  roleId: number;
  status: 0 | 1; // 0: 禁用, 1: 启用
  createTime: string;
}

// 角色相关类型定义
export interface Role {
  id: number;
  name: string;
  description: string;
  createTime: string;
  permissions: Permission[];
}

export interface Permission {
  id: number;
  name: string;
}

// 分页查询参数
export interface PageParams {
  pageNum?: number;
  pageSize?: number;
  username?: string;
  status?: number;
  [key: string]: any;
}

// 分页响应数据
export interface PageResponse<T> {
  code: number;
  msg: string;
  data: {
    list: T[];
    count: number;
    pageNum?: number;
    pageSize?: number;
  };
}